<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>家庭记账系统</title>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

    <!-- Bootstrap Core CSS -->
    <link href="${pageContext.request.contextPath}/static/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="${pageContext.request.contextPath}/static/bower_components/metisMenu/dist/metisMenu.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="${pageContext.request.contextPath}/static/dist/css/sb-admin-2.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="${pageContext.request.contextPath}/static/bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="${pageContext.request.contextPath}/static/jquery-confirm/jquery-confirm.min.css" rel="stylesheet">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>
	<input type="hidden" id="menuIds" value="${pMenus }" />
    <div id="wrapper">
        <!-- Navigation -->
        <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
            <div class="navbar-header">
                <a class="navbar-brand" href="">家庭记账系统 @version 1.0 by GK</a>
            </div>
            <!-- /.navbar-header -->

            <ul class="nav navbar-top-links navbar-right">
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-envelope fa-fw"></i>
                        <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-messages">
                        
                    </ul>
                </li>
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-tasks fa-fw"></i>
                        <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-tasks">
                    </ul>
                </li>
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-bell fa-fw"></i> 
                        <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-alerts">
                    </ul>
                </li>
                <!-- /.dropdown -->
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-user fa-fw"></i>  
                        <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-user">
                        <li>
                        	<a href="#">
                        		<i class="fa fa-user fa-fw"></i> 
                        		User Profile
                        	</a>
                        </li>
                        <li>
                        	<a href="#">
                        		<i class="fa fa-gear fa-fw"></i> 
                        		Settings
                        	</a>
                        </li>
                        <li class="divider"></li>
                        <li>
                        	<a href="${pageContext.request.contextPath}/logout">
                        		<i class="fa fa-sign-out fa-fw"></i> 
                        		退出
                        	</a>
                        </li>
                    </ul>
                    <!-- /.dropdown-user -->
                </li>
                <!-- /.dropdown -->
            </ul>
            <!-- /.navbar-top-links -->

            <div class="navbar-default sidebar" role="navigation">
                <div class="sidebar-nav navbar-collapse">
                    <ul class="nav" id="side-menu">
                        <li>
                            <a href="${pageContext.request.contextPath}/welcome" target="content" onclick="setTitle('我的主页')">
                            	<i class="fa fa-dashboard fa-fw"></i>我的主页
                            </a>
                        </li>
                        <c:if test="${!empty menus }">
                        <c:forEach items="${menus}" var="menu">
                        	<c:if test="${empty menu.url }">
                        		<li>
                        			<a href="#" id="menu_${menu.id }">${menu.name}<span class="fa arrow"></span></a>
                        			<c:if test="${!empty menu.subMenus}">
                        				<ul class="nav nav-second-level">
                        				<c:forEach items="${menu.subMenus}" var="subMenu">
                        					<li>
			                                    <a href="${pageContext.request.contextPath}${subMenu.url}" id="menu_${subMenu.id }" target="content" onclick="setTitle('${subMenu.name}');">${subMenu.name}</a>
			                                </li>
			                            </c:forEach>
                        				</ul>
                        			</c:if>
                        		</li>
                        	</c:if>
                        	<c:if test="${!empty menu.url }">
	                        	<li>
	                        		<a href="${pageContext.request.contextPath}${menu.url}" id="menu_${menu.id }" target="content" onclick="setTitle('${menu.name}');">${menu.name}</a>
	                        	</li>
                        	</c:if>
                        </c:forEach>
                        </c:if>
                        <li>
                            <a href="#">Test1<span class="fa arrow"></span></a>
                            <ul class="nav nav-second-level">
                                <li>
                                    <a href="#">test11</a>
                                </li>
                                <li>
                                    <a href="#">test12</a>
                                </li>
                            </ul>
                            <!-- /.nav-second-level -->
                        </li>
                    </ul>
                </div>
                <!-- /.sidebar-collapse -->
            </div>
            <!-- /.navbar-static-side -->
        </nav>

        <!-- Page Content -->
        <div id="page-wrapper">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12" style="padding-left: 0px;padding-right: 0px;">
                        <!-- <h3 class="page-header" style="margin-top: 10px;" id="topTitle">我的主页</h3> -->
                        <iframe name="content" id="mainFrame" width="100%" height="90%" 
        					src="${pageContext.request.contextPath}/welcome" frameborder="0" scrolling="auto"></iframe>
        					<!-- <div id="content"></div> -->
                    </div>
                </div>
            </div>
        </div>

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="${pageContext.request.contextPath}/static/bower_components/jquery/dist/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="${pageContext.request.contextPath}/static/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="${pageContext.request.contextPath}/static/bower_components/metisMenu/dist/metisMenu.min.js"></script>

    <!-- Custom Theme JavaScript -->
    <script src="${pageContext.request.contextPath}/static/dist/js/sb-admin-2.js"></script>
    <script src="${pageContext.request.contextPath}/static/jquery-confirm/jquery-confirm.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/myJs/index.js"></script>

</body>

</html>